<?php 
use Yii\helpers\Html;
use yii\bootstrap\Nav;


$menuItem = [];
if ($access = Yii::$app->params['access']) {
    isset($access['COURSE']['TYPE']) && $menuItem[] = ['label' => '课程分类', 'url' => ['/course/type']];
    isset($access['COURSE']['SOURCE']) && $menuItem[] = ['label' => '课程来源', 'url' => ['/course/source']];
    isset($access['COURSE']['RANK']) && $menuItem[] = ['label' => '课程难度', 'url' => ['/course/rank']];
    isset($access['COURSE']['CATE']) && $menuItem[] = ['label' => '课程类别', 'url' => ['/course/cate']];
} else {
    $menuItem = [
        ['label' => '课程分类', 'url' => ['/course/type']],
        ['label' => '课程来源', 'url' => ['/course/source']],
        ['label' => '课程难度', 'url' => ['/course/rank']],
        ['label' => '课程类别', 'url' => ['/course/cate']],
    ];
}

//菜单


echo Nav::widget([
    'options' => ['class' => 'nav nav-tabs mbm'],
    'items' => $menuItem,
]);

?>